#include <string.h>

int strlen(const char *str) {
   int len = 0;
   while (*str != 0) {
      len++;
      str++;
   }
   return len;
}

int strcpy(char *dest, char *src, int count) {
   int i;
   for (i=0; i<count; i++) {
      if (src[i] != 0) {
         dest[i] = src[i];
         i++;
      } else {
         break;
      }
   }
   return i;
}

